import Snippet from '~/components/snippet'
import Caption from '~/components/text/caption'
import { InlineCode } from '~/components/text/code'
import Note from '~/components/text/note'

export const meta = {
  editUrl: 'pages/docs/now-cli/now-cli-mdx/commands/certs.mdx',
  lastEdited: '2019-10-15T22:03:42.000Z'
}

## Certs

The `now certs` command is used to manage certificates for domains, providing functionality to list, issue, and remove them.

<Note type="warning">
  This command is intended for <b>advanced use only</b>. ZEIT Now manages
  certificates for domains automatically.
</Note>

### Basic Usage

<Snippet dark text="now certs ls" />
<Caption>Using the <InlineCode>now certs</InlineCode> command to list all certificates under an account.</Caption>

### Extended Usage

<Snippet dark text="now certs issue [domain1, domain2, domain3]" />
<Caption>Using the <InlineCode>now certs</InlineCode> command to issue certificates for multiple domains.</Caption>

<Snippet dark text="now certs rm [certificate-id]" />
<Caption>Using the <InlineCode>now certs</InlineCode> command to remove a certificate by ID.</Caption>

### Global Options

The following [global options](#options) can be passed when using the `now certs` command:

- `--debug`
- `--force`
- `--global-config`
- `--help`
- `--local-config`
- `--scope`
- `--token`

For more information on global options and their usage, refer to the [options section](#options).

### Unique Options

These are options that only apply to the `now certs` command, therefore, more information is provided.

#### Challenge Only

The `--challenge-only` option can be used to only show the challenges needed to issue a certificate.

##### Usage Example

<Snippet dark text="now certs issue foo.com --challenge-only" />
<Caption>Using the <InlineCode>now certs</InlineCode> command with the <InlineCode>--challenge-only</InlineCode> option.</Caption>

#### Certificate Files

The `--crt`, `--key` and `--ca` options must be used together to upload certificate files for a domain.

##### Usage Example

<Snippet dark text="now certs add foo.com --crt foo.crt --key bar.pem --ca foobar.ca" />
<Caption>Using the <InlineCode>now certs</InlineCode> command with the <InlineCode>--crt</InlineCode>, <InlineCode>--key</InlineCode>, and <InlineCode>--ca</InlineCode> options.</Caption>

<br />
